<?php
class Language {    
    public static function get($path = null){
        $type = Yaf_Registry::get('config')->application->language;
        $file = 'lang'.$path.'.php';
        if(is_readable($file)){
            include_once("lang/default.php");
            $default = $lang[$type];
            include_once($file);
            $lang = array_merge($default,$lang[$type]);
            return $lang;
        }else{
            yaf_loader::import("Lang/default.php");            
            include_once("lang/default.php");
            return $lang[$type];
        }
    }
}
